﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonType_Sum.aspx.cs"
    Inherits="Catering.Catering_Page.ShanShiFenXi.PersonType_Sum" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<%@ Register Src="../../UCPanle/DDLTool.ascx" TagName="DDLTool" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>人均消耗分类汇总</title>
    <link rel="stylesheet" type="text/css" href="../../Style/head.css" />
    <link rel="stylesheet" type="text/css" href="../../Style/center.css" />
    <link rel="stylesheet" type="text/css" href="../../Style/zhezhao.css" />
    <link type="text/css" rel="stylesheet" href="../Tool_Reporter/css/highslide.css" />
    <script src="../../Style/zhezhao.js" type="text/javascript"></script>
    <script src="../../Style/xxk.js" type="text/javascript"></script>
    <script type="text/javascript" src="../Tool_Reporter/js/jquery.min.js"></script>
    <style type="text/css">
        input{ vertical-align:middle;}
    </style>
</head>
<!--营养素分析start-->
<script type="text/javascript">
    function YingyangsuFenxi() {
        var areaid = document.getElementById('DDLTool1_ddl_Area');
        var classid = document.getElementById('DDLTool1_ddl_class');
        var dTime = document.getElementById('DDLTool1_TextBox1');
        var flag = yanzheng(areaid,classid,dTime,"年营养素分析");
        if (!flag) return;
        divshow('div_bg', 'div_main');
        Catering.Catering_Page.AjaxHandler.WebServiceSanshFenxi.GetYingyangsuFenxiBZ(areaid.value, classid.value, dTime.value, GetData);
    }
    function GetData(data) {
        var divnum = 0;
        var chart;
        var options = {
            chart: { 
                renderTo: 'container',
                type: 'line',
                marginRight: 25,
                marginBottom:90
            }, //容器ID
            title: { text: title }, //报表大标题
            //subtitle: { text: '报表小标题' }, //报表小标题
            xAxis: {//x轴
                categories: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
                labels: { align: 'left', x: -6, y: 16 }
            },
            yAxis: { // left y axis
                title: {
                    text: null
                },
                labels: {
                    align: 'left',
                    x: 3,
                    y: 16,
                    formatter: function () {
                        return Highcharts.numberFormat(this.value, 0);
                    }
                },
                showFirstLabel: false
            },
            tooltip: {
                formatter: function () {
                    return '<b>' + this.x + '月：</b><br/>' +
                        this.series.name + ': ' + this.y;
                }
            },
            series: []
        };
        options.series = data.YYSFXs;
        chart = new Highcharts.Chart(options);
    }
</script>
<!--营养素分析end-->
<!--食物来源分析start-->
<script type="text/javascript">
    function ShiwuLaiyuanFenxi() {
        var areaid = document.getElementById('DDLTool1_ddl_Area');
        var classid = document.getElementById('DDLTool1_ddl_class');
        var dTime = document.getElementById('DDLTool1_TextBox1');
        var flag = yanzheng(areaid, classid, dTime, "年食物来源分析");
        if (!flag) return;
        divshow('div_bg', 'div_shwlyfx');
        document.getElementById("shwlyfx_title").innerText = title;
    }
</script>
<!--食物来源分析end-->
<script type="text/javascript">
var title = "";
function yanzheng(areaid, classid, dTime, name) {
    
    var areaName = areaid.options[areaid.selectedIndex].text;
    var className = classid.options[classid.selectedIndex].text;
    if (areaid.value < 1) {
        alert("请选择作业区");
        return false;
    }
    if (classid.value < 1) {
        alert("请选择班组");
        return false;
    }
    if (dTime.value == "") {
        alert("请选择年份");
        return false;
    }
    title = areaName + className + "班组" + dTime.value + name;
    return true;
}

function Showobj() {
    var obj = document.getElementById('yuefen');
    var objtype = document.getElementById('anyue');
    if (objtype.checked == true) obj.disabled = ''; else obj.disabled = 'disabled';
}
</script>
<body>
    <form id="form1" runat="server">
    <script type="text/javascript" src="../Tool_Reporter/js/highcharts.js"></script>
    <script type="text/javascript" src="../Tool_Reporter/js/modules/exporting.js"></script>
    <script type="text/javascript" src="../Tool_Reporter/js/highslide-full.min.js"></script>
    <script type="text/javascript" src="../Tool_Reporter/js/highslide.config.js" charset="utf-8"></script>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    <Services>
    <asp:ServiceReference Path="~/Catering_Page/AjaxHandler/WebServiceSanshFenxi.asmx" />
    </Services>
    </asp:ScriptManager>
        <div class="xxk_button1">
            <ul>
                <li id="li2_1" class="li_over"><a href="PersonType_Sum.aspx">
                    <img alt="" src="../../Images/group_blue.png" />&nbsp;&nbsp;消耗分类汇总</a></li>
                <li id="li2_2" class="li_out"><a href="MonthTotal_Percent.aspx">
                    <img alt="" src="../../Images/contact_blue.png" />&nbsp;&nbsp;人均累计百分比</a></li>
                <li id="li2_3" class="li_out"><a href="PersonEdible_Statistics.aspx">
                    <img alt="" src="../../Images/contact_blue.png" />&nbsp;&nbsp;食用油统计</a></li>
            </ul>
        </div>
        <div class="Center_Content" id="div2_1" style="display: block">
            <div class="div_0207 left_width500" style="height:34px; width:998px; overflow:hidden;">
                <table width="100%" cellpadding="0" cellspacing="0" class="ckgl_table" style="height:39px" >
                    <tr>
                        <td align="left" width="500">
                            <uc1:DDLTool ID="DDLTool1" runat="server" />
                        </td>
                        <td align="right" valign="top">
                            <table>
                                <tr>
                                    <td align="right" height="34"><asp:LinkButton ID="lbtn" runat="server" onclick="lbtn_Click">开始统计</asp:LinkButton></td>
                                    <td align="right" width="100" style="display:none;"><a href="javascript:YingyangsuFenxi();" class="input_btn_a">营养素分析</a></td>
                                    <td align="right" width="100" style="display:none;"><a href="javascript:ShiwuLaiyuanFenxi();" class="input_btn_a">食物来源分析</a></td>
                                    <td width="10"></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
            <div style="height:10px; clear: both;"></div>
            <dl>
                <rsweb:ReportViewer ID="ReportViewer1" runat="server" Visible="false"  Font-Names="Verdana" Font-Size="8pt"
                    InteractiveDeviceInfos="(集合)" Style="margin-right: 0px; padding-bottom:50px;" WaitMessageFont-Names="Verdana" BackColor="White"
                    WaitMessageFont-Size="14pt" Width="100%" Height="500">
                    <LocalReport ReportPath="Catering_Page\ShanShiFenXi\Report\PersonType_Sum_rpt.rdlc">
                        <DataSources>
                        </DataSources>
                    </LocalReport>
                </rsweb:ReportViewer>
            </dl>
        </div>
        <div class="footer">
            <strong>中海油能源发展配餐服务公司渤海自营油田作业公司&nbsp;&nbsp;版权所有@CopyRight 2012</strong><span>技术支持：北京天择嘉业科技有限公司</span>
        </div>
        <!--弹出层-->
        <div id="div_bg" class="bg"></div>
        <div id="div_main" class="center_div" style="width: 700px; height: 450px; padding: 0px; left:25%; margin-top: -100px">
            <table width="100%">
                <tr>
                    <td align="center" height="400px">
                        <div id="container" style="width:680px; height:400px; "></div>
                    </td>
                </tr>
                <tr>
                    <td align="center" class="close_imgbtn" height="40">
                        <a href="#" onclick='divhidel("div_main","div_bg")'>关　闭</a>
                    </td>
                </tr>
            </table>
        </div>
        <div id="div_shwlyfx" class="center_div" style="width: 700px; height: 450px; padding: 0px; left:25%; margin-top: -100px">
            <table width="100%">
                <tr>
                    <td align="center" height="40">
                        <span id="shwlyfx_title" style="font-size:14px; font-weight:bold;"></span>
                    </td>
                </tr>
                <tr>
                    <td align="center" height="360">
                        <div id="Div2" style="width:680px; height:360px; ">
                            <table width="100%" style="height:30px;" align="center">
                                <tr>
                                    <td height="30" align="right" width="280" valign="middle">
                                        <input type="radio" value="0" name="searchType" id="annian" checked="checked" onclick="Showobj()"/>按年
                                    </td>
                                    <td align="center" width="60" valign="middle">
                                        <input type="radio" value="1" name="searchType" id="anyue" onclick="Showobj()" />按月
                                    </td>
                                    <td width="90" valign="middle"align="left">
                                        <select name="yuefen" id="yuefen" class="select_input_bg" disabled="disabled" style="width:60px;">
                                            <option value="1">1月</option>
                                            <option value="2">2月</option>
                                            <option value="3">3月</option>
                                            <option value="4">4月</option>
                                            <option value="5">5月</option>
                                            <option value="6">6月</option>
                                            <option value="7">7月</option>
                                            <option value="8">8月</option>
                                            <option value="9">9月</option>
                                            <option value="10">10月</option>
                                            <option value="11">11月</option>
                                            <option value="12">12月</option>
                                        </select>
                                    </td>
                                    <td width="250" align="left"><a class="input_btn_a" href="#">搜　索</a></td>
                                </tr>
                            </table>
                            <table width="100%" align="center">
                                <tr>
                                    <td align="right" height="35" width="150">奶类及奶制品：</td>
                                    <td width="120"><input type="text" class="input_bg" style="width:110px;" /></td>
                                    <td rowspan="6" width="410">
                                        <img src="../../Images/yyfxta.jpg" />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" height="35">大豆及坚果：</td>
                                    <td width="120"><input type="text" class="input_bg" style="width:110px;" /></td>
                                </tr>
                                <tr>
                                    <td align="right" height="35">禽肉蛋类：</td>
                                    <td width="120"><input type="text" class="input_bg" style="width:110px;" /></td>
                                </tr>
                                <tr>
                                    <td align="right" height="35">鱼虾类：</td>
                                    <td width="120"><input type="text" class="input_bg" style="width:110px;" /></td>
                                </tr>
                                <tr>
                                    <td align="right" height="35">蔬菜水果类：</td>
                                    <td width="120"><input type="text" class="input_bg" style="width:110px;" /></td>
                                </tr>
                                <tr>
                                    <td align="right" height="35">谷薯杂粮类：</td>
                                    <td width="120"><input type="text" class="input_bg" style="width:110px;" /></td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td align="center" class="close_imgbtn" height="40">
                        <a href="#" onclick='divhidel("div_shwlyfx","div_bg")'>关　闭</a>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
<script type="text/javascript">    self.parent.frames["topFrame"].ddClass(1);</script>
